home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-monitor.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  2.9 KB  |  83 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2. /* gnome-vfs-monitor.h - File Monitoring for the GNOME Virtual File System.
  3.  
  4.    Copyright (C) 2001 Ian McKellar
  5.  
  6.    The Gnome Library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public License as
  8.    published by the Free Software Foundation; either version 2 of the
  9.    License, or (at your option) any later version.
  10.  
  11.    The Gnome Library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public
  17.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  18.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.    Boston, MA 02111-1307, USA.
  20.  
  21.    Author: Ian McKellar <yakk@yakk.net>
  22. */
  23.  
  24. #ifndef GNOME_VFS_MONITOR_H
  25. #define GNOME_VFS_MONITOR_H
  26.  
  27. #include <glib.h>
  28.  
  29. /**
  30.  * GnomeVFSMonitorType:
  31.  * @GNOME_VFS_MONITOR_FILE: 
  32.  * @GNOME_VFS_MONITOR_DIRECTORY: 
  33.  *
  34.  * Type of resources that can be monitored.
  35.  **/
  36.  
  37. typedef enum {
  38.   GNOME_VFS_MONITOR_FILE,
  39.   GNOME_VFS_MONITOR_DIRECTORY
  40. } GnomeVFSMonitorType;
  41.  
  42. /**
  43.  * GnomeVFSMonitorEventType:
  44.  * @GNOME_VFS_MONITOR_EVENT_CHANGED: file data changed
  45.  * @GNOME_VFS_MONITOR_EVENT_DELETED: file deleted event
  46.  * @GNOME_VFS_MONITOR_EVENT_STARTEXECUTING:  
  47.  * @GNOME_VFS_MONITOR_EVENT_STOPEXECUTING: 
  48.  * @GNOME_VFS_MONITOR_EVENT_CREATED: file created event
  49.  * @GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED: file metadata changed
  50.  * 
  51.  * Types of events that can be monitored.
  52.  **/
  53.  
  54. typedef enum {
  55.   GNOME_VFS_MONITOR_EVENT_CHANGED,
  56.   GNOME_VFS_MONITOR_EVENT_DELETED,
  57.   GNOME_VFS_MONITOR_EVENT_STARTEXECUTING,
  58.   GNOME_VFS_MONITOR_EVENT_STOPEXECUTING,
  59.   GNOME_VFS_MONITOR_EVENT_CREATED,
  60.   GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED
  61. } GnomeVFSMonitorEventType;
  62.  
  63. typedef struct GnomeVFSMonitorHandle GnomeVFSMonitorHandle;
  64.  
  65. /**
  66.  * GnomeVFSMonitorCallback:
  67.  * @handle: the handle of the monitor that created the event
  68.  * @monitor_uri: the URI of the monitor that was triggered
  69.  * @info_uri: the URI of the actual file this event is concerned with (this can be different
  70.  * from @monitor_uri if it was a directory monitor)
  71.  * @event_type: what happened to @info_uri
  72.  * @user_data: user data passed to gnome_vfs_monitor_add() when the monitor was created
  73.  *
  74.  * Function called when a monitor detects a change.
  75.  *
  76.  **/
  77. typedef void (* GnomeVFSMonitorCallback) (GnomeVFSMonitorHandle *handle,
  78.                                           const gchar *monitor_uri,
  79.                                           const gchar *info_uri,
  80.                                           GnomeVFSMonitorEventType event_type,
  81.                                           gpointer user_data);
  82. #endif /* GNOME_VFS_MONITOR_H */
  83.